;; Sri Ganeshji : Sri Balaji : Sri Pitreshwarji : Sri Durgaji : Sri Venkateshwara
/*
Objective(s) -
-	This code demonstrates the usage of Profiler Actions and Functions

Syntax -
-	<Application Path>\Tally.exe /DevMode

Dependencies -
-	Exe must be open with Command Line Parameter /DevMode

Last Modification -
-	Created on 19-4-2013
*/

[Menu: TSPL Smp Profiler]

	Use		: TSPL Smp DevMode Common Menus
	Add		: Button	: TSPL Smp Profiler
	Title	: "Profiler"

[Button: TSPL Smp Profiler]
	
	Key    	: Ctrl + P
    Title   : If ##IsProfilerOn Then "End Profile" Else "Start Profile"
	Action	: Call 		: TSPL Smp ProfilerOnOff
	
[Function: TSPL Smp ProfilerOnOff]
	
	010 : If 	: $$IsProfilerOn		;; Function returns true if Status of the Profiler is 'On'
	020 : 		Stop Profile	: "tdlprof.log"
	025 : 		Msg Box			: "Profiler" 	: "Profile Information has been dumped to tdlprof.log"
	030 : Else
	040 : 		Start Profile	;; If the status of profiler is off, then this Action is executed to Start the Profiler
	050 : End If	
	060 : Set			: IsProfilerOn 	: $$IsProfilerOn

[System: Variable]
	
	Variable	: IsProfilerOn 	: Logical	: No
	
;; End of file